package casarural;

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.util.Vector;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.SwingConstants;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class PantallaConfirmacion extends JFrame {

    private JPanel contentPane;
    
    /**
     * Create the frame.
     */
    public PantallaConfirmacion(String info) {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(100, 100, 450, 151);
        contentPane = new JPanel();
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        setContentPane(contentPane);
        contentPane.setLayout(null);
        
        JLabel label = new JLabel("");
        label.setHorizontalAlignment(SwingConstants.CENTER);
        label.setBounds(26, 26, 386, 23);
        contentPane.add(label);
        label.setText(info);
        
        JButton btnAceptar = new JButton("Aceptar");
        btnAceptar.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                jButton1_actionPerformed(e);
            }
        });
        btnAceptar.setBounds(160, 74, 114, 31);
        contentPane.add(btnAceptar);
    }
    
    
    private void jButton1_actionPerformed(ActionEvent e)
    {
        this.setVisible(false);
        this.dispose();
    }
 
}
